package com.utils;


public class JdbcTableColumn {

	private Integer isKey;
	
	private String name;
	
	private String type;
	
	private String nameBig;
	
	private String sqlType;
	
	private String javaType;
	
	private String xmlType;
	
	private Integer isNull;
	
	private String remark;
	
	private String length;
	
	private String defaults;

	public JdbcTableColumn() {
		super();
	}
	
	public JdbcTableColumn(Integer isKey, String name,String type,
			String sqlType, Integer isNull, String remark,String length,String defaults) {
		super();
		this.isKey = isKey;
		this.name = name;
		this.type = type;
		this.sqlType = sqlType;
		this.isNull = isNull;
		this.remark = remark;
		this.length=length;
		this.defaults=defaults;
	}
	
	public JdbcTableColumn(Integer isKey, String name, String type, String nameBig,
			String sqlType, String javaType, Integer isNull, String remark,String length,String defaults) {
		super();
		this.isKey = isKey;
		this.name = name;
		this.type = type;
		this.nameBig = nameBig;
		this.sqlType = sqlType;
		this.javaType = javaType;
		this.isNull = isNull;
		this.remark = remark;
		this.length=length;
		this.defaults=defaults;
	}

	public Integer getIsKey() {
		return isKey;
	}

	public void setIsKey(Integer isKey) {
		this.isKey = isKey;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNameBig() {
		if(null != name){
			return StrUtil.toFirstBig(name);
		}
		return nameBig;
	}

	public void setNameBig(String nameBig) {
		this.nameBig = nameBig;
	}

	public String getSqlType() {
		return sqlType;
	}

	public void setSqlType(String sqlType) {
		this.sqlType = sqlType;
	}

	public String getJavaType() {
		javaType = MySqlJdbcType.sqlToJava(sqlType);
		return javaType;
	}

	public String getXmlType() {
		xmlType = MySqlJdbcType.sqlToJdbc(sqlType);
		return xmlType;
	}

	public void setXmlType(String xmlType) {
		this.xmlType = xmlType;
	}

	public void setJavaType(String javaType) {
		this.javaType = javaType;
	}

	public Integer getIsNull() {
		return isNull;
	}

	public void setIsNull(Integer isNull) {
		this.isNull = isNull;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getLength() {
		return length;
	}

	public void setLength(String length) {
		this.length = length;
	}

	public String getDefaults() {
		return defaults;
	}

	public void setDefaults(String defaults) {
		this.defaults = defaults;
	}
	
}
